//
//  CustomizedBarButtonItem.m
//  Portable Traffic Signal Assistor
//
//  Created by Ding on 8/12/12.
//  Copyright (c) 2012 TTU. All rights reserved.
//

#import "CustomizedBarButtonItem.h"

@implementation CustomizedBarButtonItem
@synthesize button=_button;

-(void) dealloc
{
    [_button release];
    [super dealloc];
}

-(id) initCustomizedBarButtonItem:(UIImage*) image target:(id)target action:(SEL)action
{
    self.button = [UIButton buttonWithType:UIButtonTypeCustom];
    [self.button setFrame:CGRectMake(0.0f, 0.0f, 35.0f, 35.0f)];
    [self.button addTarget:target action:action forControlEvents:UIControlEventTouchUpInside];
//    [self.button setImage:[UIImage imageNamed:@"GPS.png"] forState:UIControlStateNormal];
    [self.button setImage:image forState:UIControlStateNormal];

    self = [super initWithCustomView:self.button];
    return self;
}

@end
